home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2002 January / PC Answers January 2002.7z / PC Answers January 2002.bin / graphics / freepixl / _SETUP.1 / haiku.pxl < prev    next >
Text File  |  2000-12-23  |  6KB  |  248 lines

  1. {    Filename    :     haiku.pxl
  2.      Purpose    :    Interesting variations on errors
  3.     Date        :    January 2, 2000
  4.     Author        :    Stewart DIBBS, VYSOR
  5. History:
  6.  
  7.     Version    :  4.20    RELEASE
  8.     Update        :  
  9.     Date        :  
  10.  
  11. --------------------------------------------------------------------------}
  12. Initialize: {only one instance allowed}
  13.     UseCoordinates(PIXEL)
  14.     Title$ = "Haiku Error Messages"                                  
  15.     WinExist(Title$,Res)
  16.     If Res = 0 Then Goto One_Instance
  17.     Beep
  18.     WinSetActive(Title$,Res)
  19.     WinShow(Title$,RESTORE,Res)
  20.     End
  21. One_Instance:
  22.     UseCaption(Title$) {change the title}
  23.     WinLocate(Title$,306,154,688,430,Res)                
  24.     UseBackground(TRANSPARENT,0,128,192)     
  25.     WinShow(Title$,NOTOPMOST,Res) 
  26.     DrawBackGround
  27.     DirGet(SourceDir$) {used later for library function calls}
  28.  
  29.     {DragAcceptFile(ENABLE,AcceptFile)}
  30.     AutoProgressBar(DISABLE)
  31.  
  32.     InfoMenu(REMOVE)
  33.     WaitInput(100)
  34.     SetMenu("&File",IGNORE,
  35.         "E&xit!",Terminate,
  36.         ENDPOPUP)
  37.         
  38.     StatusWindow(ENABLE,BOTTOM,2,400,-1,0,0)
  39.     DrawStatusWinText(0,"Ready")
  40.     ChangeMenuItem("&StatusBar",CHECK,SBRes)
  41.  
  42.     WinGetClientRect("",cx1,cy1,cx2,cy2)
  43.     SetMouse(cx1,cy1,cx2,cy2,ShoHaiku,n,n)
  44.     UseFont("Arial",9,19,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
  45.     DrawShadowText(40,70,"Click anywhere to show a message!",0,0,0,1)
  46.     
  47. Wait_for_Input:
  48.     WaitInput()
  49.  
  50. Terminate:
  51.     End
  52.  
  53.  
  54. Concept:
  55.     MessageBox(OK,1,INFORMATION,
  56. "This is a skeleton of a PiXCL application.  You could briefly
  57. describe your application's function here, or provide some
  58. basic help information.",
  59.     "PiXCL Skeleton Concept",Res)
  60.  
  61.     Goto Wait_for_Input
  62.  
  63. ShowAppHelp:
  64.     {An application Help file usually has the same name as the application.}
  65.     Winhelp("haiku.hlp",CONTENTS,"")
  66.  
  67.     Goto Wait_for_Input
  68.  
  69. About:
  70.     AboutUser("Haiku Error Messages",  { or substitute Title$}
  71.       "Two lines of text goes here e.g. Application function.",
  72.     "Four Lines of additional information goes here, perhaps contact information and Web addresses")   
  73.  
  74.     Goto Wait_for_Input
  75.  
  76. ViewToolBar:
  77.     GetMenuStatus("&ToolBar",CHECKED,Res)
  78.     If Res = 0
  79.         GoSub MakeToolbar
  80.         ChangeMenuItem("&ToolBar",CHECK,Res)
  81.     Else
  82.         Toolbar()
  83.         ChangeMenuItem("&ToolBar",UNCHECK,Res)
  84.     Endif
  85.     Goto Wait_for_Input
  86.  
  87. ViewStatusBar:
  88.     GetMenuStatus("&StatusBar",CHECKED, Res)
  89.     If Res = 0
  90.         StatusWindow(ENABLE,BOTTOM,2,400,-1,0,0)
  91.         DrawStatusWinText(0,"Ready")
  92.         ChangeMenuItem("&StatusBar",CHECK,Res)
  93.     Else
  94.         StatusWindow(DISABLE,BOTTOM,2,400,-1,0,0)
  95.        ChangeMenuItem("&StatusBar",UNCHECK,Res)
  96.     Endif
  97.     Goto Wait_for_Input
  98.  
  99. {--- Style Suggestion: place all subroutines at the end of the script.}
  100.  
  101. ShoHaiku:
  102.     Random(12,RandomNumber)
  103.     If RandomNumber = 0 Then GoSub ShowMsg00
  104.     If RandomNumber = 1 Then GoSub ShowMsg01
  105.     If RandomNumber = 2 Then GoSub ShowMsg02
  106.     If RandomNumber = 3 Then GoSub ShowMsg03
  107.     If RandomNumber = 4 Then GoSub ShowMsg04
  108.     If RandomNumber = 5 Then GoSub ShowMsg05
  109.     If RandomNumber = 6 Then GoSub ShowMsg06
  110.     If RandomNumber = 7 Then GoSub ShowMsg07
  111.     If RandomNumber = 8 Then GoSub ShowMsg08
  112.     If RandomNumber = 9 Then GoSub ShowMsg09
  113.     If RandomNumber = 10 Then GoSub ShowMsg10
  114.     If RandomNumber = 11 Then GoSub ShowMsg11
  115.     If RandomNumber = 12 Then GoSub ShowMsg12
  116.     If RandomNumber = 13 Then GoSub ShowMsg13
  117.     If RandomNumber = 14 Then GoSub ShowMsg14
  118.     If RandomNumber = 15 Then GoSub ShowMsg15
  119.     If RandomNumber = 16 Then GoSub ShowMsg16
  120.  
  121.     Goto Wait_for_Input
  122.  
  123. ShowMsg00:
  124. Msg00$ =  "File really that big?
  125.  It might be very useful.
  126.  But now it is gone."
  127.     DebugMsgBox(Msg00$)
  128.     Return
  129.  
  130. ShowMsg01:
  131. Msg01$ =  " The Web site you seek
  132.  cannot be located but
  133.  endless others exist."
  134.     DebugMsgBox(Msg01$)
  135.     Return
  136.  
  137.  
  138. ShowMsg02:
  139. Msg02$ = "Chaos reigns within.
  140.  Reflect, repent, and reboot.
  141.  Order shall return."
  142.     DebugMsgBox(Msg02$)
  143.     Return
  144.  
  145. ShowMsg03:
  146.  Msg03$ = "ABORTED effort:
  147.  Close all that you have,
  148.  You ask way too much."
  149.     DebugMsgBox(Msg03$)
  150.     Return
  151.  
  152. ShowMsg04:
  153. Msg04$ = " First snow, then silence.
  154.  This thousand dollar screen dies
  155.  so beautifully."
  156.     DebugMsgBox(Msg04$)
  157.     Return
  158.  
  159. ShowMsg05:
  160. Msg05$ = " With searching comes loss
  161.  and the presence of absence:
  162. ''My Novel'' not found."
  163.     DebugMsgBox(Msg05$)
  164.     Return
  165.  
  166. ShowMsg06:
  167. Msg06$ = " The Tao that is seen
  168.  Is not the true Tao, until
  169.  You bring fresh toner."
  170.     DebugMsgBox(Msg06$)
  171.     Return
  172.  
  173. ShowMsg07:
  174. Msg07$ = " Windows NT crashed.
  175.  I am the Blue Screen of Death.
  176.  No one hears your screams."
  177.     DebugMsgBox(Msg07$)
  178.     Return
  179.  
  180. ShowMsg08:
  181. Msg08$ = " Stay the patient course.
  182.  Of little worth is your ire.
  183.  The network is down."
  184.     DebugMsgBox(Msg08$)
  185.     Return
  186.  
  187. ShowMsg09:
  188. Msg09$ = " A crash reduces
  189.  your expensive computer
  190.  to a simple stone."
  191.     DebugMsgBox(Msg09$)
  192.     Return
  193.  
  194. ShowMsg10:
  195. Msg10$ = " Yesterday it worked.
  196.  Today it is not working.
  197.  Windows is like that."
  198.     DebugMsgBox(Msg10$)
  199.     Return
  200.  
  201. ShowMsg11:
  202. Msg11$ = " Three things are certain:
  203.  Death, taxes, and lost data.
  204.  Guess which has occurred."
  205.     DebugMsgBox(Msg11$)
  206.     Return
  207.  
  208. ShowMsg12:
  209. Msg12$ = " You step in the stream,
  210.  but the water has moved on.
  211.  This page is not here."
  212.     DebugMsgBox(Msg12$)
  213.     Return
  214.  
  215. ShowMsg13:
  216. Msg12$ = " Out of memory.
  217.  We wish to hold the whole sky,
  218.  But we never will."
  219.     DebugMsgBox(Msg13$)
  220.     Return
  221.  
  222. ShowMsg14:
  223. Msg12$ = " Having been erased,
  224.  The document you're seeking
  225.  Must now be retyped."
  226.     DebugMsgBox(Msg14$)
  227.     Return
  228.  
  229. ShowMsg15:
  230. Msg12$ = "  Rather than a beep
  231.  Or a rude error message,
  232.  These words: ''File not found.''."
  233.     DebugMsgBox(Msg15$)
  234.     Return
  235.  
  236. ShowMsg16:
  237. Msg12$ = " Serious error.
  238.  All shortcuts have disappeared.
  239.  Screen. Mind. Both are blank."
  240.     DebugMsgBox(Msg16$)
  241.     Return
  242.  
  243. ll shortcuts have disappeared.
  244.  Screen. Mind. Both are blank."
  245.     DebugMsgBox(Msg16$)
  246.     Return
  247.  
  248.